import request from "@/utils/request";

export class baseClass {
  static getUrl: string;
  static updateUrl: string;
  static addUrl: string;
  static deleteUrl: string;
  static getList(params: any) {
    return request<any, any>({
      url: this.getUrl,
      method: "get",
      params: {
        ...params,
      },
    });
  }
  static updateList(data: any) {
    return request<any, any>({
      url: this.updateUrl,
      method: "put",
      data,
    });
  }
  static addList(data: any) {
    return request<any, any>({
      url: this.addUrl,
      method: "post",
      data,
    });
  }
  static deleteList(id: any) {
    return request<any, any>({
      url: this.deleteUrl,
      method: "delete",
      params: {
        id,
      },
    });
  }
}
